home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASIMAGE.ZIP / IMAGE.PAS < prev    next >
Pascal/Delphi Source File  |  1993-09-30  |  1KB  |  56 lines

  1. Program Image;
  2.  
  3. Uses
  4.   Dos,
  5.   Crt;
  6.  
  7. Type
  8.   PalType = Array[1..256*3] Of Byte;
  9.  
  10. Var
  11.   Count : Integer;
  12.   LogoP : Pointer;
  13.   LogoPalP : Pointer;
  14.   Pal : PalType;
  15.   Ch : Char;
  16.  
  17. Procedure logo; external;
  18.  {$L logo.obj}
  19.  
  20. Procedure logopal; external;
  21.  {$L logopal.obj}
  22.  
  23.  
  24. Procedure VMode (HexMode : Byte);
  25.  
  26. begin {VMode}
  27.   asm
  28.     Mov  Ah,00
  29.     Mov  Al,HexMode                       {Sets Video Mode}
  30.     Int  10h
  31.   end;
  32. end;  {VMode}
  33.  
  34. Procedure SetPal; {SetPal}
  35. begin
  36.   LogoPalP := @logopal;                   {Set Palette Up}
  37.   Move (LogoPalP^,Pal,768);
  38.   Port[$3C8] := 0;
  39.   For Count := 1 To 256*3 Do Port[$3C9] := Pal[Count];
  40. end;              {SetPal}
  41.  
  42. Procedure ShowLogo; {ShowLogo}
  43. begin
  44.   LogoP := @logo;
  45.   Move (LogoP^, Mem[$A000:0000],64000);   {Displays Image}
  46. end;                {ShowLogo}
  47.  
  48. Begin
  49.   VMode($13);                             {Inits Video Mode to 320x200x256c}
  50.   SetPal;
  51.   ShowLogo;
  52.   Ch := Readkey;                          {Pauses Waits for a KeyPress}
  53.   VMode($03);                             {Restores Video Mode to Text Mode}
  54. End.                                                   {80x25x16}
  55.  
  56.